package com.huilian.iotbox.admin.service;

import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.dto.AgencyDto;
import com.huilian.iotbox.data.po.Agency;
import com.huilian.iotbox.data.vo.AgencyVo;
import com.huilian.iotbox.data.vo.UserInfo;

import java.util.List;
import java.util.Set;

/**
 * @Author mineChen
 * @Date: 2020/4/6 11:06
 */
public interface AgencyService {

    List<Agency> findAgencyIdAndName(Integer agencyId);

    ServerResponse add(AgencyDto agencyDto, UserInfo userInfo);

    ServerResponse findListByKeyword(UserInfo userInfo, AgencyDto agencyDto);

    ServerResponse checkBussAuthNum(String bussAuthNum, Integer agencyId, UserInfo userInfo);

    int checkAbbreviation(String alias, Integer id);

    String createAgencyNo(Agency agency);

    List<Agency> getAllAgencyOfName(UserInfo userInfo);

    AgencyDto getUserAgencyByUserId(Integer userId);

    List<Agency> findListByStatus(Integer status);

    Agency findOneAgencyById(Integer agencyId);

    /**
     * 根据Set循环查询机构无交易个数
     *
     * @param set
     * @return
     */
    Integer findSetAgencyNoTrade(Set<Integer> set);

    ServerResponse findAgency(Integer agencyId, UserInfo userInfo);

    List<AgencyVo> findAgencyByLoginUser(AgencyDto agencyDto);

    ServerResponse changeAgencyStatus(AgencyDto agencyDto);

    ServerResponse updateCustomLogo(AgencyDto agencyDto, UserInfo userInfo);

    Agency findOneAgencyByUserId(Integer userId);

    /**
     * 根据id查询机构默认设备号
     * @param id
     * @return java.lang.String
     */
    String findDefaultBurningDeviceIdById(Integer id);
}
